﻿/* Joyce
	Event NPC
*/

var status = -1;
var aaa = "#fUI/UIWindow/AriantMatch/characterIcon/5#";
var ax3 = "#fMap/MapHelper.img/weather/thankyou/4#";  //小的红色的  //"#fEffect/ItemEff/1048001/0/0#";//雪花
var yun = "#fUI/UIWindow/Megaphone/2#";////红沙漏
var yun2 = "#fUI/UIWindow/Quest/icon8/0#";////蓝指标
var yun8 = "#fUI/UIWindow/MonsterBook/arrowLeft/normal/0#";////金左指标
var yun9 = "#fUI/UIWindow/MonsterBook/arrowRight/normal/0#";////金右指标
var yun4 = "#fUI/UIWindow/Quest/reward#";////奖励
//var xax = "#fEffect/CharacterEff/1112906/0/0#";
var xax= "#fMap/MapHelper.img/weather/thankyou/4#";  //小的红色的
var ttt = "#fUI/UIWindow/Quest/icon2/7#";//"+ttt+"//美化1
var ttt1 ="#fUI/UIWindow3.img/Zero_Weapon/Npc_R/fail/10#";//
var ttt2 ="#fUI/UIWindow3.img/Zero_Weapon/Npc_L/success/2#";// 
var ttt3 ="#fCharacter/Cape/01102969.img/info/icon#";//
var ttt4 ="#fCharacter/Cape/01102970.img/info/icon#";//
var ttt5 = "#fCharacter/Cape/01102971.img/info/icon#";//
var ttt6 = "#fCharacter/Cape/01102863.img/info/icon#";//
var ttt7 = "#fUI/UIWindow.img/PvP/Scroll/enabled/next2#";
var epp = "#fEffect/CharacterEff/1082312/0/0#";  //彩光
var eff = "#fCharacter/Weapon/01702523.img/48/straight/0/effect#"; //彩虹带
var tt1 ="#fUI/UIPVP.img/MiniMapIcon/star#";  //黄星星
var tt2 ="#fUI/UIPVP.img/MiniMapIcon/star#";  //黄星星
var tt3 ="#fUI/UIPVP.img/MiniMapIcon/star#";  //黄星星
var tz10 = "#fEffect/CharacterEff/1112903/0/0#";  //红心
var axx1 = "#fEffect/CharacterEff/1062114/1/0#";  //爱心
var eff = "#fEffect/CharacterEff/1112905/0/1#"; //
var epp = "#fEffect/CharacterEff/1082312/0/0#";  //彩光
var epp1 = "#fEffect/CharacterEff/1082312/2/0#"; //彩光1
var axx = "#fEffect/CharacterEff/1051294/0/0#";  //爱心
var xxx = "#fEffect/CharacterEff/1082565/2/0#"; //星系
var kkk = "#fEffect/CharacterEff/1112925/0/0#";  //蓝星
var ppp = "#fEffect/CharacterEff/1112907/4/0#"; //泡炮 
var epp3 = "#fEffect/CharacterEff/1112908/0/1#";  //彩光3
var tz9 = "#fEffect/CharacterEff/1042176/2/0#";  //爱心
var zs = "#fEffect/CharacterEff/1112946/2/0#";  //砖石粉
var zs1 = "#fEffect/CharacterEff/1112946/1/1#";  //砖石蓝
var dxxx = "#fEffect/CharacterEff/1102232/2/0#"; //星系
var tz = "#fEffect/CharacterEff/1082565/2/0#";  //兔子蓝
var tz1 = "#fEffect/CharacterEff/1082565/4/0#";  //兔子粉
var tz7 = "#fEffect/CharacterEff/1112900/3/1#";  //音符红
var tz8 = "#fEffect/CharacterEff/1112900/4/1#";  //音符绿
var tz88 = "#fEffect/CharacterEff/1112900/5/1#";  //音符绿!
var yun1 = "#fUI/UIWindow/Quest/icon7/10#";////红色圆
//var axx1 = "#fEffect/CharacterEff/1112902/0/0#";  //蓝心
//var tz10 = "#fEffect/CharacterEff/1112925/0/1#";  //红心
var tz11 = "#fEffect/CharacterEff/1112904/0/0#";  //彩心
var tz12 = "#fEffect/CharacterEff/1112924/0/0#";  //黄星
var tz13 = "#fEffect/CharacterEff/1112925/0/0#";  //蓝星
var tz14 = "#fEffect/CharacterEff/1112926/0/0#";  //红星
var ltz43 =  "#fCharacter/Weapon/01702523.img/48/straight/0/effect#"; //彩虹带"#fMap/MapHelper.img/weather/thankyou/1#";  //中等红色心 好看
var ltz44 = "#fMap/MapHelper.img/weather/thankyou/2#";  //中等红色心 好看
var ltz45 = "#fMap/MapHelper.img/weather/thankyou/3#";  //黄色心 小的好看
var ltz46 = "#fMap/MapHelper.img/weather/thankyou/4#";  //小的红色的
var ltz39 = "#fMap/MapHelper.img/weather/lovelypartybear/7#";  //盒子
var ltz26 = "#fMap/MapHelper.img/weather/2011Haloween/6#";  //绿色蜡烛
var ltz27 = "#fMap/MapHelper.img/weather/2011Haloween/7#";  //红色蜡烛
var ltz37 = "#fMap/MapHelper.img/weather/lovelypartybear/3#";  //盒子
var ltz38 = "#fMap/MapHelper.img/weather/lovelypartybear/6#";  //盒子
var ltz50 = "#fUI/UIMiniGame.img/starPlanetRPS/heart#"; //红爱心
var tz15 = "#fEffect/CharacterEff/1112949/0/0#";  //花样音符
var tz16 = "#fEffect/CharacterEff/1112949/1/0#";  //花样音符
var tz17 = "#fEffect/CharacterEff/1112949/2/0#";  //花样音符
var tz18 = "#fEffect/CharacterEff/1112949/3/0#";  //花样音符
var tz19 = "#fEffect/CharacterEff/1112949/4/0#";  //花样音符
var tz20 = "#fEffect/CharacterEff/1114000/1/0#";  //红星花
var a1 = "#fEffect/CharacterEff/1003393/1/0#";  //黄色星星
var xg = "#fEffect/CharacterEff/1112901/0/1#"; //黄色星星
var hs = "#fEffect/CharacterEff/1114000/2/0#"; //红色闪光
var hsq = "#fEffect/CharacterEff/forceAtom/0/atom/1/parentAtom/1#"; //红色球
var ax = "#fEffect/CharacterEff/1112906/0/1#"; //黄色星星
var ax2 = "#fEffect/CharacterEff/1112903/1/1#"; //黄色星星
var d1 = "#fUI/UIWindowBT.img/WorldMap/NoticeIcon/0#";//信封
var sdf ="#fMap/MapHelper.img/weather/2011Haloween/0#"; //糖果
var BOSS4 = "#fUI/UIWindow3.img/MirrorDungeonIntrude/btIntrude/normal/5#";
var maps = Array(
		801000000,
        100000104,
        749050400,
        500000000,
		910001000,
		931000500,
        104000000,
        100000000,
        101000000,
        102000000,
        103000000,
        120000000,
        105000000,
        200000000,
        211000000,
        550000000,
        230000000,
        222000000,
        262010000,
        220000000,
        701000000,
        250000000,
        702000000,
        260000000,
        600000000,
        703000000,
        240000000,
        261000000,
        //221000000,
        251000000,
        300000000,
        270000000,
        702100000,
        800000000,
        130000000,
        310000000); 



var bossmap1 = Array(//简单模式
Array(105100100,"巨大蝙蝠魔(前3分钟无敌状态)"),
Array(220080000,"[普通模式] 帕普拉图斯！"),
//Array("[普通] 暴力熊/心疤狮王！", 551030100),
//Array("[普通] 新加坡 - 千年树精王遗迹Ⅱ", 541020700),
Array(211042200,"[普通/进阶模式] 扎昆任务！"),
Array(300030300,"[普通模式] 妖精女王 - 艾菲尼娅！")
//Array(240040700,"[普通/进阶] 暗黑龙王"),
//Array(272030300,"[简单/普通] 次元缝隙 - 阿卡伊勒祭坛"),
//Array(211070000,"[简单/普通] 狮子王之城 - 班·雷昂"),
//Array(262010000,"[普通/困难] 阿斯旺 - 希拉"),
//Array(271030600,"#d[普通/困难] 希纳斯的庭院 - 女皇"),
//Array(270050000,"[普通/混沌] 时间宠儿 - 品克缤"),
//Array(703020000,"#d[普通/强化] 强化钻机,弱小勿进(New~)"),
//Array(105200000,"#d[普通/进阶] 鲁塔比斯 - 四大天王BOSS 。"),
//Array(865000001,"#r[噩梦牢笼] 桑凯梅尔兹 - 航海入口"),
//Array(863000100,"#r[噩梦牢笼] 心树守护者之地 - 贝勒德入口"),
//Array(401053002,"#r[噩梦牢笼] 暴君城堡战场 - 暴君麦格纳斯"),
//Array(807300100,"#r[噩梦牢笼] 秘密祭坛 - 森兰丸(New~)"),
//Array(811000099,"#r[噩梦牢笼] 比睿山 - 浓姬(New~)"),
//Array(310070490,"#r[噩梦牢笼] 黑色天堂 - 斯乌(New~)")									
										); 
											
var bossmap2 = Array(//练级模式
//Array(105100100,"[简单/普2通] 巨大蝙蝠！"),
//Array(220080000,"[普通] 帕普拉图斯！"),
//Array("[普通] 暴力熊/心疤狮王！", 551030100),
//Array("[普通] 新加坡 - 千年树精王遗迹Ⅱ", 541020700),
//Array(211042200,"[简单/普通/进阶] 扎昆任务！"),
//Array(300030300,"[普通] 妖精女王 - 艾菲尼娅"),
Array(240040700,"[普通/进阶模式] 暗黑龙王"),
Array(272030300,"[普通模式] 次元缝隙 - 阿卡伊勒祭坛"),
Array(211070000,"[简单/普通模式] 狮子王之城 - 班·雷昂"),
Array(262010000,"[普通/困难模式] 阿斯旺 - 希拉"),
//Array(271030600,"#d[普通/困难] 希纳斯的庭院 - 女皇"),
Array(270050000,"[普通/混沌模式] 时间宠儿 - 品克缤")
//Array(703020000,"#d[普通/强化] 强化钻机,弱小勿进(New~)"),
//Array(105200000,"#d[普通/进阶] 鲁塔比斯 - 四大天王BOSS 。"),
//Array(865000001,"#r[噩梦牢笼] 桑凯梅尔兹 - 航海入口"),
//Array(863000100,"#r[噩梦牢笼] 心树守护者之地 - 贝勒德入口"),
//Array(401053002,"#r[噩梦牢笼] 暴君城堡战场 - 暴君麦格纳斯"),
//Array(807300100,"#r[噩梦牢笼] 秘密祭坛 - 森兰丸(New~)"),
//Array(811000099,"#r[噩梦牢笼] 比睿山 - 浓姬(New~)"),
//Array(310070490,"#r[噩梦牢笼] 黑色天堂 - 斯乌(New~)")									
										); 
				
var bossmap3 = Array(//普通模式
//Array(105100100,"[简单/普3通] 巨大蝙蝠！"),
//Array(220080000,"[普通] 帕普拉图斯！"),
//Array("[普通] 暴力熊/心疤狮王！", 551030100),
//Array("[普通] 新加坡 - 千年树精王遗迹Ⅱ", 541020700),
//Array(211042200,"[简单/普通/进阶] 扎昆任务！"),
//Array(300030300,"[普通] 妖精女王 - 艾菲尼娅"),
//Array(240040700,"[普通/进阶] 暗黑龙王"),
//Array(272030300,"[简单/普通] 次元缝隙 - 阿卡伊勒祭坛"),
//Array(211070000,"[简单/普通] 狮子王之城 - 班·雷昂"),
//Array(262010000,"[普通/困难] 阿斯旺 - 希拉"),
Array(271030600,"#b[普通模式] 希纳斯的庭院 - 女皇"),
Array(807300100,"#b[普通/困难模式] 秘密祭坛 - 森兰丸(New~)"),
//Array(270050000,"[普通/混沌] 时间宠儿 - 品克缤"),
Array(703020000,"#b[普通/困难模式] 强化钻机,弱小勿进(New~)")
//Array(105200000,"#d[普通/进阶] 鲁塔比斯 - 四大天王BOSS 。"),
//Array(865000001,"#r[噩梦牢笼] 桑凯梅尔兹 - 航海入口")
//Array(863000100,"#r[噩梦牢笼] 心树守护者之地 - 贝勒德入口"),
//Array(401053002,"#r[噩梦牢笼] 暴君城堡战场 - 暴君麦格纳斯"),
//Array(807300100,"#r[噩梦牢笼] 秘密祭坛 - 森兰丸(New~)"),
//Array(811000099,"#r[噩梦牢笼] 比睿山 - 浓姬(New~)"),
//Array(310070490,"#r[噩梦牢笼] 黑色天堂 - 斯乌(New~)")									
										); 

var bossmap4 = Array(//困难模式
//Array(105100100,"[简单/4普通] 巨大蝙蝠！"),
//Array(220080000,"[普通] 帕普拉图斯！"),
//Array("[普通] 暴力熊/心疤狮王！", 551030100),
//Array("[普通] 新加坡 - 千年树精王遗迹Ⅱ", 541020700),
//Array(211042200,"[简单/普通/进阶] 扎昆任务！"),
//Array(300030300,"[普通] 妖精女王 - 艾菲尼娅"),
//Array(240040700,"[普通/进阶] 暗黑龙王"),
//Array(272030300,"[简单/普通] 次元缝隙 - 阿卡伊勒祭坛"),
//Array(211070000,"[简单/普通] 狮子王之城 - 班·雷昂"),
//Array(262010000,"[普通/困难] 阿斯旺 - 希拉"),
//Array(271030600,"#d[普通/困难] 希纳斯的庭院 - 女皇"),
//Array(270050000,"[普通/混沌] 时间宠儿 - 品克缤"),
//Array(703020000,"#d[普通/强化] 强化钻机,弱小勿进(New~)"),
Array(105200000,"#r[普通/进阶] 鲁塔比斯 - 四大天王BOSS(New~) "),
Array(104020110,"#r[噩梦模式] 金银岛 - 恐怖的鸦天狗(New~)"),
//Array(865000001,"#r[噩梦牢笼] 桑凯梅尔兹 - 航海入口"),
Array(863000100,"#r[噩梦模式] 心树守护者之地 - 贝勒德入口(New~)"),
Array(970072200,"#r[噩梦模式] 隐藏地图 - 乌鲁斯(New~)"),
Array(401053002,"#r[普通/噩梦模式] 暴君城堡战场 - 暴君麦格纳斯(New~)"),
Array(811000999,"#r[噩梦模式] 比睿山 - 浓姬(New~)"),
Array(310070490,"#r[普通/噩梦模式] 黑色天堂 - 斯乌(New~)"),	
Array(105300303,"#r[噩梦模式] 堕落世界树 - 黑化戴米安(New~)")
										); 



var selectedMap = -1;
var selectedArea = -1;

function start() {
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == 1) {
        status++;
    } else {
        if (status >= 2 || status == 0) {
            cm.dispose();
            return;
        }
        status--;
    }

    if (status == 0) {
       //cm.sendSimple("#L0#" + eff + "#r【城镇传送】#k#l\r\n#L1#" + eff + "#r【快速练级】#k#l\r\n#L8#" + eff + "#r【休闲娱乐】#k#l\r\n#L7#" + eff + "#r【家族中心】#k(创建家族或者家族联盟)#l\r\n#L18#" + eff + "#r【豹子栖息地】#k#b#l\r\n#L19#" + eff + "#r【百宝转蛋】#k#b#l\r\n#L201#" + eff + "#r【怪物公园】#k#b#l\r\n#L200#" + eff + "#r【婚礼村】#k#b#l\r\n");
       var selStr =  "  "+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+"\r\n";
 //selStr += "  "+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+"\r\n";
 //selStr +="#v3994070##v3994073##v3994080##v3994944#    #v3994070##v3994944##v3994078##v3994078##v3994944##v3994076##l#n\r\n";
   selStr =  "#r#e\t   "+ttt1+"\t\t"+ttt2+"#n#k#n#k\r\n";
   //selStr =  "#e   "+ltz43+""+ltz44+""+ltz45+"#v4034349#万能传送#v4034349#"+ltz45+""+ltz44+""+ltz43+"#n#k#n#k";
 //selStr +="       #d#e#r#L12#"+ax3+"杂货商店"+ax3+"#l      #d#e#r#L13#"+ax3+"点券商店"+ax3+"#l#n\r\n\r\n";
//selStr += "  "+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+"\r\n";
selStr +="#d#L1#"+ttt3+"简单模式(新手可刷)#l\r\n#d#L2#"+ttt4+"练级模式(经验专用)#l\r\n#d#L3#"+ttt5+"中级模式(平民必刷)#l\r\n#r#L4#"+ttt6+"困难模式(胆小勿入)#l\t#n\r\n\r\n";
//selStr +="#d#e#L8#"+tz12+"休闲跳跳#l#d#e   #L18#" +tz13+"围捕豹子#l#d#e   #L201#"+tz14+"怪物公园#l#n\r\n\r\n";
//selStr += ""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+""+tz13+""+tz14+""+tz12+"\r\n";

 cm.sendSimple(selStr);
	   } else if (status == 1) {
	var selStr = "请选择您的目的地: #d";
    	if (selection == 0) {
            	for (var i = 0; i < bossmap1.length; i++) {
                	selStr += "\r\n#L" + i + "##m" + bossmap1[i][1] + "# #l";
            	}				
	} else if (selection == 1) {   	
                       for (var i = 0; i < bossmap1.length; i++) {
				selStr += "\r\n#L" + i + "#"+ttt3+"" + bossmap1[i][1] + "#l";
                       }	
	} else if (selection == 2) {
		//for (var i = 0; i < bossmaps.length; i++) {
                	//selStr += "\r\n#L" + i + "##m" + bossmaps[i] + "# #l";
            //	}	       	
                       for (var i = 0; i < bossmap2.length; i++) {
				selStr += "\r\n#L" + i + "#"+ttt4+"" + bossmap2[i][1] + "#l";
                       }
	} else if (selection == 3) {   	
                       for (var i = 0; i < bossmap3.length; i++) {
				selStr += "\r\n#L" + i + "#"+ttt5+"" + bossmap3[i][1] + "#l";
                       }	
  } else if (selection == 4) {
        for (var i = 0; i < bossmap4.length; i++) {
				selStr += "\r\n#L" + i + "#"+ttt6+"" + bossmap4[i][1] +"#l";
					}   
	} else if (selection == 5) {
			cm.warp(100000103,0);
			cm.dispose();
			return;
	} else if (selection == 7) {
			cm.warp(200000301,0);
			cm.dispose();
			return;
        } else {
                       for (var i = 0; i < bossmap1.length; i++) {
				selStr += "\r\n#L" + i + "#" + bossmap4[i][1] + "";
                       }
	} 
	//if(selection<1000&&selection>1003){
       selectedArea = selection;
	//}
        cm.sendSimple(selStr);
    } else if (status == 2) {
		//if (selection==20){
		//	selectedArea = selection;
		//}
		if(selection==1000||selection==1001||selection==1002||selection==1003||selection==1004){
			selectedArea = selection;
		}
        //cm.sendYesNo("看来这里的事情都已经处理完了啊。您真的要移动到 #m" + (selectedArea == 0 ? maps[selection] : monstermaps[selection]) + "# 吗？");
	cm.sendYesNo("#b后面可能会发生的很可怕的事情,您真的要移动吗？");
        selectedMap = selection;
    } else if (status == 3) {
        if (selectedMap >= 0) {
		if(selectedArea == 1){
			cm.dispose();
			cm.warp(bossmap1[selectedMap][0],0);
		}else if(selectedArea == 2){
			cm.dispose();
			cm.warp(bossmap2[selectedMap][0],0);
		}else if(selectedArea == 3){
			cm.dispose();
			cm.warp(bossmap3[selectedMap][0],0);
		}else if(selectedArea == 4){
			cm.dispose();
			cm.warp(bossmap4[selectedMap][0],0);
		}else if(selectedArea == 1001){
			cm.dispose();
			cm.warp(703002000,0);
		}else if(selectedArea == 1002){
			cm.dispose();
			cm.warp(273040100,0);
		}else if(selectedArea == 1003){
			cm.dispose();
			cm.warp(50000,0);
		}else if(selectedArea == 1004){
			cm.dispose();
			cm.warp(273040000,0);
			
		}else{
			cm.warp(monstermaps[selectedMap][0],0);
		}
            //cm.warp(selectedArea == 0 ? maps[selectedMap] : monstermaps[selectedMap], 0);
        }
        cm.dispose();
    } else if (status == 6) {
        cm.dispose();
    }
}